﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Example_abstract_class
{
    abstract class absClass
    {
        public int Add(int x, int y)
        {
            return x + y;
        }
        public abstract int Mul(int x, int y);
    }
    class absDerived : absClass
    {
        public override int Mul(int x, int y)
        {
            return x * y;
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            absDerived a = new absDerived();
            Console.WriteLine(a.Add(5, 4));
            Console.WriteLine(a.Mul(2, 3));
            absClass b = new absDerived();
            Console.WriteLine(b.Add(5, 4));
            Console.WriteLine(b.Mul(2, 3));
        }
    }
}
